3.1099 \(\int \frac {(A+B x) (a+b x+c x^2)^p}{x} \, dx\)

Optimal. Leaf size=273 \[ \frac {A 2^{2 p-1} \left (\frac {-\sqrt {b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (\frac {\sqrt {b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (a+b x+c x^2\right )^p F_1\left (-2 p;-p,-p;1-2 p;-\frac {b-\sqrt {b^2-4 a c}}{2 c x},-\frac {b+\sqrt {b^2-4 a c}}{2 c x}\right )}{p}-\frac {B 2^{p+1} \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \left (a+b x+c x^2\right )^{p+1} \, _2F_1\left (-p,p+1;p+2;\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{(p+1) \sqrt {b^2-4 a c}} \]

[Out]

-2^(1+p)*B*(c*x^2+b*x+a)^(1+p)*hypergeom([-p, 1+p],[2+p],1/2*(b+2*c*x+(-4*a*c+b^2)^(1/2))/(-4*a*c+b^2)^(1/2))*
((-b-2*c*x+(-4*a*c+b^2)^(1/2))/(-4*a*c+b^2)^(1/2))^(-1-p)/(1+p)/(-4*a*c+b^2)^(1/2)+2^(-1+2*p)*A*(c*x^2+b*x+a)^
p*AppellF1(-2*p,-p,-p,1-2*p,1/2*(-b-(-4*a*c+b^2)^(1/2))/c/x,1/2*(-b+(-4*a*c+b^2)^(1/2))/c/x)/p/(((b+2*c*x-(-4*
a*c+b^2)^(1/2))/c/x)^p)/(((b+2*c*x+(-4*a*c+b^2)^(1/2))/c/x)^p)

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 273, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {843, 624, 758, 133} \[ \frac {A 2^{2 p-1} \left (\frac {-\sqrt {b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (\frac {\sqrt {b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (a+b x+c x^2\right )^p F_1\left (-2 p;-p,-p;1-2 p;-\frac {b-\sqrt {b^2-4 a c}}{2 c x},-\frac {b+\sqrt {b^2-4 a c}}{2 c x}\right )}{p}-\frac {B 2^{p+1} \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \left (a+b x+c x^2\right )^{p+1} \, _2F_1\left (-p,p+1;p+2;\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{(p+1) \sqrt {b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(a + b*x + c*x^2)^p)/x,x]

[Out]

(2^(-1 + 2*p)*A*(a + b*x + c*x^2)^p*AppellF1[-2*p, -p, -p, 1 - 2*p, -(b - Sqrt[b^2 - 4*a*c])/(2*c*x), -(b + Sq
rt[b^2 - 4*a*c])/(2*c*x)])/(p*((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/(c*x))^p*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(c*x)
)^p) - (2^(1 + p)*B*(-((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c]))^(-1 - p)*(a + b*x + c*x^2)^(1 + p)*
Hypergeometric2F1[-p, 1 + p, 2 + p, (b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(2*Sqrt[b^2 - 4*a*c])])/(Sqrt[b^2 - 4*a*c]
*(1 + p))

Rule 133

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[(c^n*e^p*(b*x)^(m +
 1)*AppellF1[m + 1, -n, -p, m + 2, -((d*x)/c), -((f*x)/e)])/(b*(m + 1)), x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rule 624

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, -Simp[((a + b*x + c*
x^2)^(p + 1)*Hypergeometric2F1[-p, p + 1, p + 2, (b + q + 2*c*x)/(2*q)])/(q*(p + 1)*((q - b - 2*c*x)/(2*q))^(p
 + 1)), x]] /; FreeQ[{a, b, c, p}, x] && NeQ[b^2 - 4*a*c, 0] &&  !IntegerQ[4*p]

Rule 758

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c,
 2]}, -Dist[((1/(d + e*x))^(2*p)*(a + b*x + c*x^2)^p)/(e*((e*(b - q + 2*c*x))/(2*c*(d + e*x)))^p*((e*(b + q +
2*c*x))/(2*c*(d + e*x)))^p), Subst[Int[x^(-m - 2*(p + 1))*Simp[1 - (d - (e*(b - q))/(2*c))*x, x]^p*Simp[1 - (d
 - (e*(b + q))/(2*c))*x, x]^p, x], x, 1/(d + e*x)], x]] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b^2 - 4*a*c, 0]
 && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] &&  !IntegerQ[p] && ILtQ[m, 0]

Rule 843

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dis
t[g/e, Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + b*x + c*x^
2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]
&&  !IGtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {(A+B x) \left (a+b x+c x^2\right )^p}{x} \, dx &=A \int \frac {\left (a+b x+c x^2\right )^p}{x} \, dx+B \int \left (a+b x+c x^2\right )^p \, dx\\ &=-\frac {2^{1+p} B \left (-\frac {b-\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}\right )^{-1-p} \left (a+b x+c x^2\right )^{1+p} \, _2F_1\left (-p,1+p;2+p;\frac {b+\sqrt {b^2-4 a c}+2 c x}{2 \sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} (1+p)}-\left (2^{2 p} A \left (\frac {1}{x}\right )^{2 p} \left (\frac {b-\sqrt {b^2-4 a c}+2 c x}{c x}\right )^{-p} \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{c x}\right )^{-p} \left (a+b x+c x^2\right )^p\right ) \operatorname {Subst}\left (\int x^{1-2 (1+p)} \left (1+\frac {\left (b-\sqrt {b^2-4 a c}\right ) x}{2 c}\right )^p \left (1+\frac {\left (b+\sqrt {b^2-4 a c}\right ) x}{2 c}\right )^p \, dx,x,\frac {1}{x}\right )\\ &=\frac {2^{-1+2 p} A \left (\frac {b-\sqrt {b^2-4 a c}+2 c x}{c x}\right )^{-p} \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{c x}\right )^{-p} \left (a+b x+c x^2\right )^p F_1\left (-2 p;-p,-p;1-2 p;-\frac {b-\sqrt {b^2-4 a c}}{2 c x},-\frac {b+\sqrt {b^2-4 a c}}{2 c x}\right )}{p}-\frac {2^{1+p} B \left (-\frac {b-\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}\right )^{-1-p} \left (a+b x+c x^2\right )^{1+p} \, _2F_1\left (-p,1+p;2+p;\frac {b+\sqrt {b^2-4 a c}+2 c x}{2 \sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} (1+p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.38, size = 263, normalized size = 0.96 \[ \frac {1}{2} (a+x (b+c x))^p \left (\frac {A 4^p \left (\frac {-\sqrt {b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (\frac {\sqrt {b^2-4 a c}+b+2 c x}{c x}\right )^{-p} F_1\left (-2 p;-p,-p;1-2 p;-\frac {b+\sqrt {b^2-4 a c}}{2 c x},\frac {\sqrt {b^2-4 a c}-b}{2 c x}\right )}{p}+\frac {B 2^p \left (-\sqrt {b^2-4 a c}+b+2 c x\right ) \left (\frac {\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p} \, _2F_1\left (-p,p+1;p+2;\frac {-b-2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{c (p+1)}\right ) \]

Warning: Unable to verify antiderivative.

[In]

Integrate[((A + B*x)*(a + b*x + c*x^2)^p)/x,x]

[Out]

((a + x*(b + c*x))^p*((4^p*A*AppellF1[-2*p, -p, -p, 1 - 2*p, -1/2*(b + Sqrt[b^2 - 4*a*c])/(c*x), (-b + Sqrt[b^
2 - 4*a*c])/(2*c*x)])/(p*((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/(c*x))^p*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(c*x))^p)
+ (2^p*B*(b - Sqrt[b^2 - 4*a*c] + 2*c*x)*Hypergeometric2F1[-p, 1 + p, 2 + p, (-b + Sqrt[b^2 - 4*a*c] - 2*c*x)/
(2*Sqrt[b^2 - 4*a*c])])/(c*(1 + p)*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c])^p)))/2

________________________________________________________________________________________

fricas [F]  time = 0.86, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (B x + A\right )} {\left (c x^{2} + b x + a\right )}^{p}}{x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+b*x+a)^p/x,x, algorithm="fricas")

[Out]

integral((B*x + A)*(c*x^2 + b*x + a)^p/x, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B x + A\right )} {\left (c x^{2} + b x + a\right )}^{p}}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+b*x+a)^p/x,x, algorithm="giac")

[Out]

integrate((B*x + A)*(c*x^2 + b*x + a)^p/x, x)

________________________________________________________________________________________

maple [F]  time = 1.23, size = 0, normalized size = 0.00 \[ \int \frac {\left (B x +A \right ) \left (c \,x^{2}+b x +a \right )^{p}}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(c*x^2+b*x+a)^p/x,x)

[Out]

int((B*x+A)*(c*x^2+b*x+a)^p/x,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B x + A\right )} {\left (c x^{2} + b x + a\right )}^{p}}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+b*x+a)^p/x,x, algorithm="maxima")

[Out]

integrate((B*x + A)*(c*x^2 + b*x + a)^p/x, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\left (A+B\,x\right )\,{\left (c\,x^2+b\,x+a\right )}^p}{x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(a + b*x + c*x^2)^p)/x,x)

[Out]

int(((A + B*x)*(a + b*x + c*x^2)^p)/x, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B x\right ) \left (a + b x + c x^{2}\right )^{p}}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x**2+b*x+a)**p/x,x)

[Out]

Integral((A + B*x)*(a + b*x + c*x**2)**p/x, x)

________________________________________________________________________________________